import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/laoshi/LoginView.vue'
import Dashboard from '../views/laoshi/Dashboard.vue'
import StudentManagement from '../views/laoshi/StudentManagement.vue'
import TeacherManagement from '../views/laoshi/TeacherManagement.vue'
import CategoryManagement from '../views/laoshi/CategoryManagement.vue'
import CourseManagement from '../views/laoshi/CourseManagement.vue'
import OrderManagement from '../views/laoshi/OrderManagement.vue'
import DocumentManagement from '../views/laoshi/DocumentManagement.vue'
import IncomeManagement from '../views/laoshi/IncomeManagement.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: LoginView,
    },
    {
      path: '/dashboard',
      name: 'dashboard',
      component: Dashboard,
    },
    {
      path: '/student-management',
      name: 'student-management',
      component: StudentManagement,
    },
    {
      path: '/teacher-management',
      name: 'teacher-management',
      component: TeacherManagement,
    },
    {
      path: '/category-management',
      name: 'category-management',
      component: CategoryManagement,
    },
    {
      path: '/course-management',
      name: 'course-management',
      component: CourseManagement,
    },
    {
      path: '/order-management',
      name: 'order-management',
      component: OrderManagement,
    },
    {
      path: '/document-management',
      name: 'document-management',
      component: DocumentManagement,
    },
    {
      path: '/income-management',
      name: 'income-management',
      component: IncomeManagement,
    },
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
  ],
})

export default router
